Auxiliary-Link-Based Call Compensation System and Apparatus, and Chip

ABSTRACT

This application relates to the field of communications technologies, and in particular, to an auxiliary-link-based call compensation system and apparatus, and chip. The system includes: a first terminal, a second terminal, and a core network device. The first terminal and the second terminal establish a primary link in response to a dialing operation entered by a user. The first terminal and the second terminal establish at least one auxiliary link in response to an auxiliary link establishment condition. The first terminal transmits call data packets with the second terminal by using the primary link and the at least one auxiliary link. The first terminal and/or the second terminal performs post-processing and playing on the call data packets received by using the primary link and the at least one auxiliary link.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a national stage of International Application No.PCT/CN2021/080454, filed on Mar. 12, 2021, which claims priority toChinese Patent Application No. 202010169865.6 filed on Mar. 12, 2020 andChinese Patent Application No. 202010356941.4, filed on Apr. 29, 2020.All of the aforementioned applications are hereby incorporated byreference in their entireties.

TECHNICAL FIELD

This application relates to the field of communications technologies,and in particular, to an auxiliary-link-based call compensation systemand apparatus, and a chip.

BACKGROUND

During a call, a terminal needs to be connected to an internet protocolmultimedia subsystem (Internet Protocol Multimedia Subsystem, IMS) corenetwork device by using an access network element (for example, a devicesuch as a base station or a Wi-Fi router), to establish a call link totransmit a call data packet. However, due to poor network distribution,mutual interference between a plurality of networks, building blocking,or the like, a network signal transmitted by the access network elementmay be weak when being receiving by the terminal or even fail to bereceived by the terminal. Therefore, in a call process, a large quantityof call data packets in the call link may be lost, a delay may beexcessively long, or a jitter may be excessively large, resulting inproblems such as voice discontinuity, no sound, or even call dropping.

SUMMARY

This application provides an auxiliary-link-based call compensationsystem and apparatus, and chip, so as to resolve a prior-art problem ofa call exception such as voice discontinuity, no sound, or even calldropping of a terminal in a call process, and improve call quality.

To achieve the foregoing objective, this application uses the followingtechnical solutions.

According to a first aspect, an auxiliary-link-based call compensationsystem is provided, including a first terminal, a second terminal, and acore network device, where the first terminal and the second terminalare connected by using the core network device, and establish a primarylink; and the first terminal is configured to: establish at least oneauxiliary link with the second terminal in response to an auxiliary linkestablishment condition, where the auxiliary link is different from theprimary link; and transmit call data packets with the second terminal byusing the primary link and the at least one auxiliary link.

By using the auxiliary-link-based call compensation system provided inthis embodiment, the first terminal and the second terminal may use theauxiliary link and the primary link to jointly transmit the call datapackets, thereby improving problems such as call discontinuity, nosound, and video frame freezing caused by a network signal exception,and improving call quality.

In some embodiments, the auxiliary link is: a point-to-point auxiliarylink established according to an IP protocol or a D2D protocol; or aserver auxiliary link established according to an IP protocol or a D2Dprotocol; or a core network link based on a base station, where both thefirst terminal and the second terminal are connected to the core networkdevice by using the base station; or a core network link based on aWi-Fi device, where both the first terminal and the second terminal areconnected to the core network device by using the Wi-Fi device.

The IP protocol may be IPv4 or IPv6. The point-to-point auxiliary linkor the server auxiliary link can be used to reduce dependency of a callprocess on an access network element or a core network device. Even ifthe access network element or the core network device is abnormal duringthe call process, current call quality of the terminal can be improvedto some extent. The core network link based on the base station or thecore network link based on the Wi-Fi device is used as the auxiliarylink, so that existing resources can be fully utilized.

In some embodiments, the primary link is a core network link based onthe base station or a core network link based on the Wi-Fi device.

In some embodiments, the auxiliary link establishment conditionincludes: the first terminal receives a dialing operation entered by auser; or the first terminal displays a ringing interface; or the firstterminal receives a call answering operation entered by a user; or thefirst terminal is currently in an abnormal geographical location; or thefirst terminal is being handed over from a first abnormal cell to asecond abnormal cell; or call quality of the first terminal is abnormalon the primary link, where the abnormal geographical location, the firstabnormal cell, and the second abnormal cell are determined by the firstterminal based on a historical call process of the first terminal.

In some embodiments, that the call quality is abnormal includes:uplink/downlink quality is abnormal; or uplink/downlink datatransmission quality is abnormal; or an encoding format of the call datapacket is a preset encoding format on the primary link; or at least oneof a sampling rate, an encoding rate, encoding quality, resolution, aframe rate, a quantity of sound channels, or a MOS value of the calldata packet is less than a respective corresponding threshold on theprimary link.

By using the foregoing auxiliary link establishment condition, theterminal may establish the auxiliary link in advance, so as to enablethe auxiliary link at any time when the call quality is abnormal,thereby improving the call quality. Alternatively, the auxiliary linkmay be established when it is predicted that a call may be abnormal, soas to quickly improve call quality. Alternatively, the auxiliary linkstarts to be established after the call quality exception is detected,so as to reduce resource overheads of the terminal.

In some embodiments, when the auxiliary link is the point-to-pointauxiliary link, that the first terminal establishes the auxiliary linkwith the second terminal includes:

The first terminal sends an IP address and a port number of the firstterminal to the second terminal by using the primary link; the firstterminal receives a first link detection command sent by the secondterminal, where the first link detection command is used to detectwhether the IP address and the port number of the first terminal can beused to successfully receive a message; and the first terminal sends afirst response message to the second terminal based on the first linkdetection command.

The point-to-point auxiliary link is in a unidirectional transmissionmode, and is used by the second terminal to send a call data packet tothe first terminal. When only data transmission from the second terminalto the first terminal is abnormal on the primary link, not only callquality can be improved in the unidirectional transmission mode, butalso resource overheads of the terminal can be reduced.

In some embodiments, when the auxiliary link is the point-to-pointauxiliary link, that the first terminal establishes the auxiliary linkwith the second terminal further includes:

The first terminal receives an IP address and a port number of thesecond terminal by using the primary link; the first terminal sends asecond link detection command to the second terminal, where the secondlink detection command is used to detect whether the IP address and theport number of the second terminal can be used to successfully receive amessage; and the first terminal receives a second response message sentby the second terminal, where the second response message is used torespond to the second link detection command.

The point-to-point auxiliary link is in the unidirectional transmissionmode, and is used by the first terminal to send the call data packet tothe second terminal. When only data transmission from the first terminalto the second terminal is abnormal on the primary link, not only callquality can be improved in the unidirectional transmission mode, butalso resource overheads of the terminal can be reduced.

In addition, the foregoing two unidirectional transmission modes mayalso be used in combination, and call data packets are transmittedbidirectionally between the first terminal and the second terminal byusing the auxiliary link.

In some embodiments, when the auxiliary link is the server auxiliarylink, the system further includes a server, and that the first terminalestablishes the auxiliary link with the second terminal includes:

The first terminal sends an auxiliary link establishment request to theserver, where the auxiliary link establishment request carries a secondfeature identifier of the second terminal, so that the server sends theauxiliary link establishment request to the second terminal based on thesecond feature identifier; and the first terminal receives a responsemessage sent by the second terminal, where the response message is usedto respond to the auxiliary link establishment request.

The server auxiliary link is established in request-response mode. Thisensures reliability of the server auxiliary link and prevents a failureto establish the server auxiliary link because a terminal cannot connectto the server.

In some embodiments, when the auxiliary link is the server auxiliarylink, the system further includes a server, and that the first terminalestablishes the auxiliary link with the second terminal includes: Thefirst terminal and the second terminal each actively establish aconnection to the server to form the server auxiliary link.

By establishing the server auxiliary link in advance, the terminal mayenable the auxiliary link at any time during a call and transmit calldata packets by using the auxiliary link, thereby quickly improving callquality.

In some embodiments, that the first terminal transmits the call datapackets with the second terminal by using the primary link and the atleast one auxiliary link includes:

The first terminal sends call data packets to the second terminal byusing the primary link and the at least one auxiliary link; and thefirst terminal receives, by using the primary link and the at least oneauxiliary link, call data packets sent by the second terminal.

In some embodiments, that the first terminal sends the call data packetsto the second terminal by using the primary link and the at least oneauxiliary link includes: The first terminal sends a plurality of firstcall data packets to the second terminal by using the primary link, andsends a plurality of second call data packets to the second terminal byusing the at least one auxiliary link, where the plurality of first calldata packets and the plurality of second call data packets arecompletely the same, or completely different, or partially the same, anda sum of the plurality of first call data packets and the plurality ofsecond call data packets includes all call data packets collected by thefirst terminal.

When the plurality of first call data packets and the plurality ofsecond call data packets are completely the same, a quantity of calldata packets missing by the second terminal can be reduced. When theplurality of first call data packets and the plurality of second calldata packets are completely different or only partially the same,transmission pressure of the call data packets on the primary link canbe reduced, and call quality can be improved.

In some embodiments, that the first terminal sends the call data packetsto the second terminal by using the primary link and the at least oneauxiliary link includes:

The first terminal detects an uplink call quality parameter of the firstterminal; and when the uplink call quality parameter falls within apreset range, the first terminal keeps a sampling rate, an encodingscheme, a encoding rate, encoding quality, resolution, a quantity ofsound channels, or a frame rate of call data in the sent call datapacket unchanged; when the uplink call quality parameter is better thanthe preset range and continues to be optimized, the first terminalincreases at least one of a sampling rate, an encoding scheme, anencoding rate, encoding quality, resolution, a quantity of soundchannels, or a frame rate of call data in the sent call data packet; orwhen the uplink call quality parameter is worse than the preset rangeand continues to become worse, the first terminal reduces at least oneof a sampling rate, an encoding scheme, an encoding rate, encodingquality, resolution, a quantity of sound channels, or a frame rate ofcall data in the sent call data packet.

By using a call data packet sending manner provided in this embodiment,the sampling rate, the encoding scheme, the encoding rate, the encodingquality, the resolution, or the frame rate of the call data in the calldata packet may be adjusted based on link quality, so that call qualityof the first terminal and the second terminal is maintained in anoptimal state as much as possible.

In some embodiments, the first terminal is further configured to performpost-processing and playing on the call data packets received by usingthe primary link and the at least one auxiliary link, where thepost-processing includes combination, deduplication, and sorting.

In some embodiments, when the plurality of first call data packetsreceived from the primary link and the plurality of second call datapackets received from the auxiliary link have sequence numbers of thesame type, the combination includes: aggregating the plurality of firstcall data packets and the plurality of second call data packets into acombined call data packet.

By using a call data packet combination manner provided in thisembodiment, all call data packets received by the terminal can bemaximumly retained, a loss of a call data packet received by the secondterminal is reduced, and call quality is improved.

In some embodiments, when the plurality of first call data packetsreceived from the primary link and the plurality of second call datapackets received from the auxiliary link have sequence numbers ofdifferent types, the combination includes: determining link qualityparameters of the primary link and each auxiliary link; determining anoptimal call link or at least two auxiliary links based on the linkquality parameters; and using a call data packet received from theoptimal call link as a combined call data packet, or combining call datapackets on the at least two auxiliary links to obtain a combined calldata packet.

In this embodiment, based on the link quality parameter of each link,the best call link may be a primary link or an auxiliary link. By usinga call data packet combination manner provided in this embodiment,resource overheads when the terminal combines the call data packets canbe reduced, and call quality can be improved.

In some embodiments, when the plurality of first call data packetsreceived from the primary link and the plurality of second call datapackets received from the auxiliary link have sequence numbers ofdifferent types, the combination includes: performing audio and videofeature fusion on the first call data packet and the second call datapacket, to obtain a fused call data packet; and using the fused calldata packet as a combined call data packet.

By using a call data packet combination manner provided in thisembodiment, all call data packets received by the terminal can bemaximumly retained, a loss of a call data packet received by the secondterminal is reduced, and call quality is improved.

In some embodiments, when the auxiliary link is the point-to-pointauxiliary link or the server auxiliary link, the first terminal and thesecond terminal establish the auxiliary link by using Wi-Fi or cellulardata.

In some embodiments, when both the first terminal and the secondterminal establish the auxiliary link by using Wi-Fi, the auxiliary linkis always used to transmit a call data packet until a call ends afterthe auxiliary link is established successfully, so as to improve callquality. Alternatively, the auxiliary link may transmit a call datapacket in only a process in which call quality is abnormal, so as toavoid unnecessary waste of resources.

In some embodiments, when at least one of the first terminal and thesecond terminal establishes the auxiliary link by using the cellulardata, the auxiliary link is used to transmit a call data packet in onlya process in which a call quality exception occurs on the primary link,so as to save cellular data traffic while improving call quality.Alternatively, after the auxiliary link is established successfully, theauxiliary link is always used to transmit a call data packet, so as toensure call quality as much as possible.

In some embodiments, when both a first SIM card and a second SIM cardare installed in the first terminal, if a current call card of the firstterminal is the first SIM card, and a movement rate of the firstterminal is greater than a rate threshold, the first terminal preferablyuses cellular data of the second SIM card in a process of establishingthe auxiliary link by using the cellular data.

By using a cellular data selection manner provided in this embodiment,it can be avoided, to some extent, that the primary link and theauxiliary link simultaneously perform cell handover when the terminalmakes a call in a high-speed movement process, thereby improving callquality.

In some embodiments, the call data in the second call data packet is aPCM data stream.

In some embodiments, the first terminal further includes a firstmicrophone and a second microphone, and the first terminal is furtherconfigured to: collect left channel call data by using the firstmicrophone, and collect right channel call data by using the secondmicrophone; and send the left channel call data and the right channelcall data packet to the second terminal, where the left channel calldata is played by the second terminal by using a first playingcomponent, and the right channel call data is played by the secondterminal by using a second playing component. According to the methodprovided in this embodiment, a receive end (that is, the secondterminal) can play a stereo sound effect, and has relatively good userexperience.

For example, the first playing component and the second playingcomponent may belong to a same device. For example, the first playingcomponent may be a left headset, and the second playing component may bea right headset. Alternatively, the first playing component and thesecond playing component may belong to different devices. For example,the first playing component is a speaker of the receive-end device, andthe second playing component is a mono headset connected to thereceive-end device.

In some embodiments, that the left channel call data and the rightchannel call data are sent to the second terminal includes: The leftchannel call data and the right channel call data are jointly encoded,and jointly encoded call data is sent to the second terminal by using asame auxiliary link; or the left channel call data and the right channelcall data are separately encoded and sent to the second terminal byusing different auxiliary links.

According to a second aspect, an embodiment provides anauxiliary-link-based call compensation apparatus, applied to a firstterminal. The first terminal and a second terminal are connected byusing a core network device, and establish a primary link. The apparatusis configured to control the first terminal to perform the followingoperations: establishing at least one auxiliary link with the secondterminal in response to an auxiliary link establishment condition, wherethe auxiliary link is different from the primary link; and transmittingcall data packets with the second terminal by using the primary link andthe at least one auxiliary link.

According to a third aspect, an embodiment provides anauxiliary-link-based call compensation method, applied to a firstterminal. The first terminal and a second terminal are connected byusing a core network device, and establish a primary link. The methodincludes: establishing at least one auxiliary link to the secondterminal in response to an auxiliary link establishment condition, wherethe auxiliary link is different from the primary link; and transmittingcall data packets with the second terminal by using the primary link andthe at least one auxiliary link.

According to a fourth aspect, an embodiment provides a chip, applied toa first terminal, where the first terminal establishes a primary link toa second terminal by using a core network device, the chip includes amemory and a processor, and the processor executes a computer programstored in the memory, to control the first terminal to perform thefollowing process: establishing at least one auxiliary link to thesecond terminal in response to an auxiliary link establishmentcondition, where the auxiliary link is different from the primary link;transmitting call data packets with the second terminal by using theprimary link and the at least one auxiliary link.

It may be understood that, for beneficial effects of the second aspectto the fourth aspect, reference may be made to the related descriptionsin the first aspect. Details are not described herein again.

According to a fifth aspect, an embodiment of this application providesan auxiliary link-based communications system, including a firstterminal and a second terminal. The first terminal and the secondterminal perform OTT communication, and establish a primary link. Thefirst terminal is configured to: establish at least one auxiliary linkwith the second terminal in response to an auxiliary link establishmentcondition, where the auxiliary link is different from the primary link;obtain PCM data streams of call data; generate call data packets basedon the PCM data streams; and transmit the call data packets with thesecond terminal by using the primary link and the at least one auxiliarylink.

It should be noted that, in a communication process of the system, abottom-layer PCM data stream obtaining module (for example, a digitalsignal processor (Analog Device Instrument, ADSP) or an audio recordingmodule (audio record)) may directly obtain PCM data streams of a call,and send the PCM data streams to a communication peer end, withoutcopying and playing a voice packet by using an OTT application layer, soas to reduce impact on an original OTT call link.

According to the system provided in this embodiment, in a process ofperforming an OTT call (for example, making a WeChat call) between thefirst terminal and the second terminal, the auxiliary link and theprimary link may be used to jointly transmit the call data packet,thereby improving problems such as call discontinuity, no sound, andvideo frame freezing, and improving call quality.

In some embodiments, the auxiliary link establishment condition is: Thefirst terminal receives a dialing operation entered by a user; or thefirst terminal displays a ringing interface; or the first terminalreceives a call answering operation entered by a user; or the firstterminal is currently in an abnormal geographical location; or the firstterminal is being handed over from a first abnormal cell to a secondabnormal cell; or call quality of the first terminal is abnormal on theprimary link; or an encoding format of the call data packet is a presetencoding format on the primary link; or at least one of a sampling rate,an encoding rate, encoding quality, resolution, a frame rate, a quantityof sound channels, or a MOS value of the call data packet is less than arespective corresponding threshold on the primary link, where theabnormal geographical location, the first abnormal cell, and the secondabnormal cell are determined by the first terminal based on a historicalcall process of the first terminal.

In some embodiments, the primary link or the auxiliary link is apoint-to-point auxiliary link established according to an IP protocol ora D2D protocol, or a server auxiliary link established according to anIP protocol or a D2D protocol.

According to a sixth aspect, an embodiment of this application furtherprovides an auxiliary link-based communications system, including afirst terminal and a second terminal. The first terminal and the secondterminal are connected by using Bluetooth, and establish a primary link.The first terminal is configured to: establish at least one auxiliarylink with the second terminal in response to an auxiliary linkestablishment condition, where the auxiliary link is different from theprimary link; and transmit data packets with the second terminal byusing the primary link and the at least one auxiliary link.

According to the system provided in this embodiment, in a process inwhich the first terminal and the second terminal perform Bluetoothcommunication, a call data packet may be jointly transmitted by usingthe auxiliary link and the primary link. This improves a datatransmission rate.

In some embodiments, the auxiliary link establishment conditionincludes: call quality of the primary link is abnormal; or a Bluetoothsignal strength of the first terminal is less than a strength threshold.

In some embodiments, the auxiliary link is a Wi-Fi link or a dataservice link.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 a is a schematic diagram 1 of a primary link according to anembodiment of this application;

FIG. 1 b is a schematic diagram 2 of a primary link according to anembodiment of this application;

FIG. 2 is a schematic flowchart of establishing a primary link accordingto an embodiment of this application;

FIG. 3 is a schematic diagram 1 of a call link according to anembodiment of this application;

FIG. 4 is a schematic flowchart of an auxiliary-link-based callcompensation method according to an embodiment of this application;

FIG. 5 is a schematic diagram 2 of a call link according to anembodiment of this application;

FIG. 6 is a schematic diagram of a terminal ringing interface accordingto an embodiment of this application;

FIG. 7 is a schematic diagram of a scenario in which a user answers acall according to an embodiment of this application;

FIG. 8 is a schematic flowchart 1 of establishing an auxiliary linkaccording to an embodiment of this application;

FIG. 9 is a schematic diagram of a structure of an RTCP packet accordingto an embodiment of this application;

FIG. 10 is a schematic diagram of a structure of source descriptionitems according to an embodiment of this application;

FIG. 11 is a schematic flowchart 2 of establishing an auxiliary linkaccording to an embodiment of this application;

FIG. 12 is a schematic diagram 3 of a call link according to anembodiment of this application;

FIG. 13 is a schematic diagram 4 of a call link according to anembodiment of this application;

FIG. 14A and FIG. 14B are a schematic diagram of a principle of sendinga call data packet according to an embodiment of this application;

FIG. 15 is a schematic diagram 1 of allocation of dual-link call datapackets according to an embodiment of this application;

FIG. 16 is a schematic diagram 2 of allocation of dual-link call datapackets according to an embodiment of this application;

FIG. 17 is a schematic diagram 3 of allocation of dual-link call datapackets according to an embodiment of this application;

FIG. 18 is a schematic diagram 4 of allocation of dual-link call datapackets according to an embodiment of this application;

FIG. 19 is a schematic diagram 5 of allocation of dual-link call datapackets according to an embodiment of this application;

FIG. 20 is a schematic diagram 1 of call data packet transmissionaccording to an embodiment of this application;

FIG. 21 is a schematic diagram 2 of call data packet transmissionaccording to an embodiment of this application;

FIG. 22 is a schematic diagram 1 of dual-channel call data packettransmission according to an embodiment of this application;

FIG. 23 is a schematic diagram 2 of dual-channel call data packettransmission according to an embodiment of this application; and

FIG. 24 is a schematic diagram of a structure of a chip according to anembodiment of this application.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

The auxiliary-link-based compensation call method provided in theembodiments of this application is applicable to a voice call processand a video call process, and may be applied to a terminal that canperform a voice call or a video call, such as a mobile phone, a tabletcomputer, a wearable device, a vehicle-mounted device, a notebookcomputer, or a netbook. A specific type of the terminal is not limitedin embodiments of this application.

It should be understood that the first, the second, and various numbersin this specification are used for differentiation only for ease ofdescription, instead of limiting the scope of this application.

It should also be understood that the term “and/or” in thisspecification describes only an association relationship for describingassociated objects and represents that three relationships may exist.For example, A and/or B may represent the following three cases: Only Aexists, both A and B exist, and only B exists. In addition, thecharacter “/” in this specification generally indicates an “or”relationship between the associated objects.

In a call process, the terminal is connected to a core network device byusing an access network element, to establish a primary link for thecall and perform an operator call. When the terminal makes a call byusing technologies such as circuit switched (Circuit Switched, CS),voice over long-term evolution (Voice over Long-Term Evolution, VoLTE),voice over new radio (Voice over New Radio, VoNR), voice over long-termevolution (Video over Long-Term Evolution, ViLTE), voice over new radio(Video over New Radio, ViNR), evolved packet system fallback (EvolvedPacket System fallback, EPS fallback), CS fallback (CS fallback), andrich communication suite (Rich Communication Suite, RCS), an accessnetwork element on the primary link is a base station. When the terminalmakes a call by using a technology such as a voice over wirelessfidelity (wireless fidelity, WiFi) (Voice over WiFi, VoWiFi) or a voiceover Wi-Fi (Video over WiFi, ViWiFi), the access network element on theprimary link is a Wi-Fi device, and the Wi-Fi device includes a Wi-Firouter or a Wi-Fi hotspot device.

For example, referring to a schematic diagram of a primary link shown inFIG. 1 a , access network elements that connect the first terminal andthe second terminal to the core network device are base stations. Referto a schematic diagram of a primary link shown in FIG. 1 b . Accessnetwork elements that connect the first terminal and the second terminalto the core network device is Wi-Fi devices.

It should be noted that, in this embodiment, in a call process, the twoterminals may establish a connection to the core network device by usinga same communications technology, and the primary link is formed.Alternatively, the two terminals may establish a connection to the corenetwork device by using different communications technologies, and theprimary link is formed. For a voice call, the communications technologymay be CS, VoLTE, VoNR, VoWiFi, EPS fallback, CS fallback, RCS, or thelike. For a video call, the communications technology may be ViLTE,ViWiFi, or the like.

For example, both the first terminal and the second terminal may beconnected to the core network device by using VoLTE. Alternatively, thefirst terminal is connected to the core network device by using VoLTE,and the second terminal is connected to the core network device by usingVoNR.

The following describes a process of establishing the primary link. Forexample, the first terminal and the second terminal may establish theprimary link for a call between the two terminals by using the sessioninitiation protocol (Session Initiation Protocol, SIP), and transmit acall data packet by using the primary link, so as to implement the callbetween the two terminals.

It should be noted that, in this embodiment, when the first terminal isa calling terminal, the second terminal is a called terminal; and whenthe first terminal is a called terminal, the second terminal is acalling terminal.

FIG. 2 is a schematic flowchart of establishing a primary link between afirst terminal and a second terminal. In FIG. 2 , the first terminal isa calling terminal, the second terminal is a called terminal (that is,the first terminal calls the second terminal), and the primary link isestablished between the first terminal and the second terminal by usingSIP. An establishment procedure includes the following content.

(1) The first terminal invites the second terminal to join a session

First, after receiving a dialing operation entered by a user, the firstterminal sends a call invitation message (INVITE) to a core networkdevice, to invite the second terminal to join the session. The INVITEincludes a phone number of the first terminal and a phone number of thesecond terminal. After receiving the INVITE, the core network devicefirst sends a first processing indication message (100TRYING-1) to thefirst terminal, to notify the first terminal that the core networkdevice has received the INVITE and has started processing. Subsequently,after performing user authentication on the first terminal, the corenetwork device sends the INVITE to the second terminal. After receivingthe INVITE, the second terminal sends a second processing indicationmessage (100TRYING-2) to the core network device, to notify the corenetwork device that the second terminal has received the INVITE and hasstarted processing.

(2) Establishment of session progress information

First, the second terminal sends a session progress message (183PROGRESS) to the first terminal by using the core network device, toprompt the first terminal to establish the session progress information.In this case, a quality of service class identifier (Quality of ServiceClass Identifier, QCI) dedicated bearer of the second terminal is setup, and is a QCI 1. Subsequently, the first terminal sends a sessionprogress response message (PRACK) to the second terminal by using thecore network device, to respond to the 183 PROGRESS. In this case, adedicated bearer of a QCI 1 of the first terminal is set up. Finally,the second terminal sends a first acknowledgment message (200OK-1) tothe first terminal by using the core network device, to notify the firstterminal that a session progress is established.

(3) The first terminal and the second terminal perform resourcereservation configuration

First, after completing local resource reservation, the first terminalsends a configuration update message (UPDATE) to the second terminal byusing the core network device, to indicate that the first terminal hascompleted resource reservation. Subsequently, after completing localresource configuration, the second terminal sends a secondacknowledgment message (200OK-2) to the first terminal by using the corenetwork device, to indicate that the second terminal has completedresource reservation.

(4) The second terminal displays a ringing interface. After displayingthe ringing interface, the second terminal sends a ringing (180 RINGING)message to the first terminal by using the core network device, toindicate that the second terminal rings.

(5) The second terminal receives a call answering operation entered bythe user. After receiving the call answering operation, the secondterminal sends a third acknowledgment message (200OK-3) to the secondterminal by using the core network device, to indicate that the secondterminal has answered the call and that the INVITE has been successfullyprocessed. The first terminal sends an answer message to the secondterminal by using the core network device, to indicate that the firstterminal has learned that the INVITE has been successfully processed.

After the foregoing processes (1) to (5), the primary link for the callbetween the first terminal and the second terminal is established. In aprimary link-based call process, a call data packet collected by thefirst terminal is first sent by the first terminal to the core networkdevice by using an access network element, and then sent by the corenetwork device to the second terminal by using an access networkelement. Similarly, the call data packet collected by the secondterminal is first sent by the second terminal to the core network deviceby using the access network element, and then sent by the core networkdevice to the second terminal by using the access network element.

It should be noted that, in this embodiment, the call between the firstterminal and the second terminal may be a voice call, or may be a videocall. If the first terminal and the second terminal perform the voicecall, the call data packet is a voice data packet. If the first terminaland the second terminal perform the video call, the call data packetincludes both a video data packet and a voice data packet.

During a call, network signals may be weak or even fail to be receiveddue to poor network distribution, mutual interference between aplurality of networks, building blocking, or base station or corenetwork device faults. Therefore, a large quantity of call data packetsin a call link may be lost, a delay may be excessively long, or a jittermay be excessively large, resulting in problems such as voicediscontinuity, no sound, or even call dropping.

For the foregoing problem, referring to FIG. 3 , a possible solution isthat in a call process of the terminal, the core network device on theprimary link monitors call quality of the primary link. If the callquality is poor, the core network device on the primary link controlsanother core network device to establish an auxiliary link between thetwo terminals. After the dual links are established, the core networkdevice on the primary link always monitors uplink/downlink call qualityof all links, so as to determine which link or which two links are used,combine call data packets on the two links, and then send a combineddata packet to a terminal on the other side.

However, in the foregoing process, when the core network device on theprimary link is faulty, or a service processing capability is reduced(for example, when a large quantity of call services need to bemaintained during peak hours of a call service, for example, 10:00 to11:00 in the morning and 17:00 to 18:00 in the afternoon), the corenetwork device on the primary link may not be able to effectively managethe two channels and maintain a call in time, resulting in a relativelylong call delay or even call dropping.

Therefore, this application provides another auxiliary-link-based callcompensation method. In a call process of the primary link, at least oneauxiliary link different from the primary link is used to simultaneouslytransmit call data packets, so as to reduce dependency of the callprocess on a core network device or a base station, and improve callquality.

FIG. 4 is a flowchart of an auxiliary-link-based call compensationmethod according to this application. The method includes the followingsteps S401 to S404.

S401: A first terminal and a second terminal establish a primary link inresponse to a dialing operation entered by a user.

In this embodiment, the primary link is a call link established by thefirst terminal and the second terminal through a core network device andan access network element. For example, the primary link may be theforegoing core network link based on the base station, or the corenetwork link based on the Wi-Fi device. For a specific establishmentprocess, refer to related descriptions in FIG. 2 . Details are notdescribed again in this embodiment.

S402: The first terminal and the second terminal establish at least oneauxiliary link in response to an auxiliary link establishment condition.

In this embodiment, both the first terminal and the second terminal maystart to establish an auxiliary link between the first terminal and thesecond terminal after detecting the auxiliary link establishmentcondition.

In this embodiment, the auxiliary link may be a point-to-point auxiliarylink, a server auxiliary link, a core network link based on the basestation, or a core network link based on the Wi-Fi device. In thisembodiment, both the point-to-point auxiliary link and the serverauxiliary link are links established by the first terminal and thesecond terminal according to an internet protocol (Internet Protocol,IP). Optionally, the IP protocol may be IPv4 or IPv6.

The point-to-point auxiliary link or the server auxiliary link can beused to reduce dependency of a call process on the access networkelement or the core network device. Even if the access network elementor the core network device is abnormal during the call process, currentcall quality of the terminal can be improved to some extent. The corenetwork link based on the base station or the core network link based onthe Wi-Fi device is used as the auxiliary link, so that existingresources can be fully utilized.

It should be noted that the primary link and the auxiliary link aredifferent links. For example, when the primary link is the core networklink based on the base station, the auxiliary link may be at least oneof the point-to-point auxiliary link, the server auxiliary link, or thecore network link based on the Wi-Fi device. When the primary link isthe core network link based on the Wi-Fi device, the auxiliary link maybe at least one of the point-to-point auxiliary link, the serverauxiliary link, or the core network link based on the base station.

For example, FIG. 5 is a schematic diagram of the call link between thefirst terminal and the second terminal. The primary link is the corenetwork link based on the base station, and the auxiliary link includesthe point-to-point auxiliary link and the server auxiliary link. Boththe primary link and the auxiliary link can transmit call data packetsbetween the first terminal and the second terminal.

It should be noted that, in this embodiment, when the first terminal isa calling terminal, the second terminal is a called terminal; or whenthe first terminal is a called terminal, the second terminal is acalling terminal.

S403: The first terminal transmits call data packets with the secondterminal by using the primary link and the at least one auxiliary link.

In a process in which the primary link and the auxiliary link work atthe same time, the call data packets transmitted by the primary link andthe auxiliary link may be completely the same, may be completelydifferent, or may be partially the same. However, a sum of call datapackets transmitted on the primary link and all auxiliary links includesall call data packets collected by the first terminal and/or the secondterminal.

In this embodiment, a data transmission mode of the primary link or theauxiliary link may be a unidirectional transmission mode, or may be abidirectional transmission mode. The unidirectional transmission modemeans that the primary link or the auxiliary link is only used totransmit the call data packet sent by the first terminal to the secondterminal, or is only used to transmit the call data packet sent by thesecond terminal to the first terminal. The bidirectional transmissionmode means that the primary link or the auxiliary link may be used totransmit the call data packet sent by the first terminal to the secondterminal, and may also be used to transmit the call data packet sent bythe second terminal to the first terminal.

For example, when only data transmission from the second terminal to thefirst terminal is abnormal on the primary link, the auxiliary link maybe in the unidirectional transmission mode, and used by the secondterminal to send the call data packet to the first terminal.Alternatively, when only data transmission from the first terminal tothe second terminal is abnormal on the primary link, the auxiliary linkmay be in the unidirectional transmission mode, and used by the firstterminal to send the call data packet to the second terminal. Thismethod can not only improve call quality, but also reduce resourceoverheads of the terminal.

Certainly, in a call process, the call data packets may alternatively betransmitted on the primary link and the auxiliary link by using theunidirectional transmission mode and the bidirectional transmission modetogether. For example, the primary link transmits the call data packetsin the bidirectional transmission mode, and the auxiliary link transmitsthe call data packets in the unidirectional transmission mode.

It should be noted that, regardless of which data transmission mode isused by the primary link and the auxiliary link, the sum of call datapackets transmitted by the primary link and the auxiliary link includesall call data packets collected by the first terminal and the secondterminal.

S404: The first terminal and/or the second terminal performspost-processing and playing on call data packets received by using theprimary link and the at least one auxiliary link.

After receiving the call data packets, the first terminal or the secondterminal needs to perform post-processing and playing on the call datapackets, where the post-processing includes combining, deduplicating,and sorting the call data packets.

The following describes a process of establishing the auxiliary link inthis application.

First, auxiliary link establishment conditions are described, which maybe classified into the following three types: (1) A terminal establishesan auxiliary link in advance. (2) The terminal establishes an auxiliarylink when predicting that a call may be abnormal. (3) After detectingthat the call quality is poor, the terminal establishes an auxiliarylink.

(1) The terminal establishes the auxiliary link in advance.

Strengths of network signals may vary in different areas. Therefore, ifthe terminal makes a call in a moving process, voice discontinuity, nosound, video image freezing, and the like may occur in the call processdue to a location change. For example, after the terminal enters anelevator car in the call process, a problem of call voice discontinuitysuddenly occurs. Therefore, in a possible implementation, the firstterminal and the second terminal may establish the auxiliary link inadvance, so as to enable the auxiliary link at any time when callquality is abnormal, thereby quickly improving call quality.

In some embodiments, the auxiliary link establishment condition may bethat the first terminal or the second terminal detects featureinformation in a process of establishing the primary link. For example,referring to the flowchart of establishing the primary link shown inFIG. 2 , the calling terminal may start to establish the auxiliary linkafter sending the INVITE. Alternatively, the called terminal may startto establish the auxiliary link after displaying the ringing interface.For example, the ringing interface may be shown in FIG. 6 .

In some other embodiments, the auxiliary link establishment conditionmay be that the calling terminal or the called terminal receives a useroperation. For example, the calling terminal may establish the primarylink and the auxiliary link at the same time after detecting a dialingoperation entered by the user. Alternatively, referring to FIG. 7 , thecalled terminal may start to establish the auxiliary link afterdetecting a call answering operation entered by the user.

In some other embodiments, the calling terminal and the called terminalmay alternatively establish the auxiliary link at a preset time afterthe primary link is established. The preset time is pre-configured, forexample, the second second, the third second, or the fifth second. Thisis not limited in this embodiment.

(2) The terminal establishes the auxiliary link when predicting that thecall may be abnormal.

In a daily call process, the terminal may determine, by detecting callquality, scenarios in which call quality exceptions often occur, andstore exception indication information corresponding to these scenarios.For example, a geographical location in which a call exception oftenoccurs is determined as an abnormal geographical location, or in a cellhandover process in which call quality exceptions often occurs, a cellbefore handover is determined as a first abnormal cell, and a cell afterhandover is determined as a second abnormal cell.

Therefore, in some embodiments, the auxiliary link establishmentcondition may be: The first terminal is currently in the abnormalgeographical location, or the first terminal is being handed over fromthe first abnormal cell to the second abnormal cell.

When the first terminal detects, in the call process, that the currentlocation information is an abnormal geographical location, or the firstterminal is handed over from the first abnormal cell to the secondabnormal cell, it is considered that an exception may occur in the call,and the auxiliary link starts to be established to improve call quality.

(3) The terminal establishes the auxiliary link after detecting that thecall quality is abnormal.

To save resource overheads of the terminal (for example, to avoid thatthe auxiliary link is not put into use after being established), thecalling terminal and the called terminal may alternatively start toestablish the auxiliary link after detecting that the call quality isabnormal.

Therefore, in some embodiments, the auxiliary link establishmentcondition may be that the calling terminal or the called terminaldetects the call quality exception. The call quality exception includesan uplink call quality exception and/or a downlink call qualityexception.

Specifically, in a call process, the calling terminal and the calledterminal may continuously detect call quality of the primary link. Whenthe terminal on either side detects that the call quality on the primarylink is abnormal, the auxiliary link is established.

Call quality includes uplink call quality and downlink call quality. Theuplink call quality includes uplink quality and/or uplink data packettransmission quality. The downlink call quality includes downlinkquality and/or downlink data packet transmission quality. In thisembodiment, the uplink call data packet is a call data packet sent bythe terminal to the core network device by using the access networkelement, and the downlink call data packet is a call data packet sent bythe core network device to the terminal by using the access networkelement.

The uplink quality of the terminal may be determined based on at leastone of an uplink air interface transmission rate of the primary link,terminal signal transmit power, a media access control (Media AccessControl, MAC) layer bit error status, a congestion status of packet dataconvergence protocol (Packet Data Convergence Protocol, PDCP) uplinkdata, a data traffic control status, an uplink scheduling and grantstatus, a buffer time, an out-of-synchronization status, a radioresource control (Radio Resource Control, RRC) release, establishment,reestablishment, and a handover status, and a tracking area update(Tracking Area Update, TAU) result, an uplink signal quality parameter.Signal quality parameters include at least one of a reference signalstrength (Reference Signal Receiving Power, RSRP), reference signalquality (Reference Signal Receiving Quality, RSRQ), or a signal-to-noiseratio (signal to interference plus noise ratio, SINR). When the airinterface transmission rate is determined, impact of an interferencefactor needs to be considered. The jitter of call data packets refers toa difference between a receiving timestamp and a sending timestamp ofadjacent data packets. The uplink data packet transmission quality maybe determined based on parameters such as a packet loss rate of anuplink call data packet, a quantity of lost packets within a presettime, a delay, and a jitter.

The first terminal and/or the second terminal may determine, based onuplink/downlink quality of the primary link and/or uplink/downlink datapacket transmission quality, whether call quality of the primary link isabnormal. For example, when the uplink air interface transmission rateis less than a rate threshold, the terminal determines that uplink callquality of the terminal is abnormal. Alternatively, when the packet lossrate of an uplink call data packet is greater than a packet loss ratethreshold, the terminal determines that uplink call quality of theterminal is abnormal. Alternatively, when the terminal transmits asignal at full power, the uplink air interface transmission rate is lessthan the rate threshold, the packet loss rate is greater than the packetloss rate threshold, and the signal-to-noise ratio is less than asignal-to-noise ratio threshold, the terminal determines that callquality of the terminal is abnormal.

The downlink quality of the primary link of the terminal may bedetermined based on at least one of parameters such as anout-of-synchronization status, an RRC release, establishment,reestablishment, and a handover status, a TAU result, and downlinksignal quality. The downlink data packet transmission quality may bedetermined based on parameters such as a packet loss rate of a downlinkcall data packet, a quantity of lost packets within a preset time, adelay, and a jitter.

For example, when the packet loss rate of the downlink call data packetis greater than the packet loss rate threshold, the terminal determinesthat downlink call quality of the terminal is abnormal. Alternatively,when the packet loss rate of the downlink call data packet is greaterthan the packet loss rate threshold, a delay is greater than a delaythreshold, and a signal-to-noise ratio is less than the signal-to-noiseratio threshold, the terminal determines that downlink call quality ofthe terminal is abnormal.

In this embodiment, the rate threshold, the packet loss rate threshold,the delay threshold, the jitter time threshold, the signal-to-noiseratio threshold, and the like are pre-configured, and are not limited inthis embodiment. For example, the rate threshold may be 10 kb/s, 20kb/s, or the like; the packet loss rate threshold may be 5%, 10%, or thelike; the delay threshold may be 100 ms, 120 ms, or the like; and thesignal-to-noise ratio threshold may be 3 decibels (dB), 10 dB, or thelike.

In addition, during a call between the first terminal and the secondterminal, the first terminal and the second terminal may periodicallyreceive a downlink call quality detection result of the peer end. If theresult indicates that the downlink voice quality of the peer end isabnormal, the auxiliary link is established.

Optionally, in a call process, the first terminal and/or the secondterminal may further detect an encoding format of the call data packet.When the encoding format is a first encoding format, it is alsoconsidered that quality of the current call is abnormal, and theauxiliary link needs to be established, so as to transmit the call datapacket in a second encoding format by using the auxiliary link. Thefirst encoding format may be a voice encoding format with relatively lowencoding quality, such as adaptive multi-rate narrowband (Adaptive MultiRate-Narrow Band, AMR-NB), or a video encoding format with relativelylow encoding quality, such as H264. The second coding format is a voiceencoding format with relatively high coding quality, such as pulse codemodulation (Pulse Code Modulation, PCM), Opus, adaptive multi-ratewideband (adaptive multi rate-narrow band, AMR-WB), enhanced voiceservices (enhance voice services, EVS), and EVS Codec extension forimmersive voice and audio services (EVS Codec Extension for ImmersiveVoice and Audio Services, IVAS), or a video encoding format withrelatively high coding quality, such as H265 and H266.

In this embodiment, at a receive end (the first terminal or the secondterminal), both a call data packet with low encoding quality and a calldata packet with high encoding quality may be received. The receive endmay choose to output the audio and video data based on the call datapacket with the high encoding quality, or may choose to perform fusionprocessing on the call data packet with the low encoding quality and thecall data packet with the high coding quality, and output the audio andvideo data based on the call data packet obtained after the fusionprocessing, thereby improving call quality between the first terminaland the second terminal.

Optionally, the first terminal and/or the second terminal may furtherdetect a sampling rate, an encoding rate, encoding quality, resolution,a quantity of sound channels or a frame rate, or a mean opinion score(Mean Opinion Score, MOS) of call data on the primary link. When atleast one of these parameters does not meet a respective correspondingthreshold, it is also considered that the current call quality isabnormal, and the auxiliary link needs to be established, so as totransmit call data with a higher sampling rate, a higher encoding rate,higher encoding quality, a higher resolution, a higher frame rate, alarge quantity of sound channels, or a large MOS value by using theauxiliary link, thereby improving call quality between the firstterminal and the second terminal. For example, a threshold of thesampling rate may be 16 kHz, a threshold of the encoding rate may be12.65 kbps, a threshold of the resolution may be 720P, a threshold ofthe frame rate may be 22 fps, a threshold of the quantity of soundchannels may be 2, and a threshold of the MOS value may be 3.5. Specificvalues of these thresholds are not limited in this embodiment.

The following describes a process of establishing the auxiliary link inthis application.

In this embodiment, the auxiliary link may be the point-to-pointauxiliary link, the server auxiliary link, the core network link basedon the base station, or the core network link based on the Wi-Fi device.For a specific process of establishing the core network link based onthe base station or the core network link based on the Wi-Fi device,refer to the link establishment flowchart shown in FIG. 2 . Details arenot described herein in this embodiment.

The core network link based on the base station may be a call link suchas VoLTE, VoNR, ViLTE, ViNR, EPS fallback, CS fallback or RCS, and thecore network link based on the Wi-Fi device may be a call link such asVoWiFi or ViWiFi. Based on this, it should be understood that, in thisembodiment, when the first terminal and the second terminal use the basestation as an access network element to perform a CS, VoLTE, VoNR,ViLTE, ViNR, EPS fallback, CS fallback call, an RCS call, or the like, aWi-Fi device may be further used as an access network element toestablish a VoWiFi or ViWiFi auxiliary link. Similarly, when the firstterminal and the second terminal use the Wi-Fi device as the accessnetwork element to perform a VoWiFi or ViWiFi call, the base station mayalso be used as the access network element to establish a CS, VoLTE,VoNR, ViLTE, ViNR, EPS fallback, CS fallback auxiliary link or an RCSauxiliary link, so as to improve call quality.

The point-to-point auxiliary link and the server auxiliary link areestablished according to the IP protocol or the device to device (Deviceto Device, D2D) protocol, and are used to transmit a call data packetthrough the internet. The point-to-point auxiliary link is used toperform direct transmission of the call data packet between the firstterminal and the second terminal, and the server auxiliary link is usedto forward the call data packet between the first terminal and thesecond terminal by using the server.

The following separately describes processes of establishing thepoint-to-point auxiliary link and the server auxiliary link.

FIG. 8 is a schematic flowchart of establishing a point-to-pointauxiliary link according to this embodiment, including the followingsteps S801 to S803.

S801: In response to an auxiliary link establishment condition, a firstterminal sends an IP address and a port number of the first terminal toa second terminal.

In a call process, a terminal usually uses a real-time transportprotocol (Real-time Transport Protocol, RTP) and a real-time transportcontrol protocol (Real-time Control Protocol, RTCP).

During a call, the terminal transmits multimedia data packets (such ascall data packets) through RTP, monitors the call quality through RTCP,and transmits information about participants in the call. Through RTCP,the terminal can periodically send RTCP packets to other participants(such as the peer end and core network device) of the session to feedback the current call quality. Content carried in the RTCP packet maybedetermined based on a pre-configuration, for example, may carry aquantity of data packets sent by the terminal, a quantity of lost datapackets, or a jitter condition of the data packets. Certainly, the RTCPpacket may also include parameters required by other sessions.

Therefore, in a possible implementation, after detecting the auxiliarylink establishment condition, the first terminal may write the IPaddress and the port number of the local end into the RTCP packet of thecurrent call link (that is, the primary link) of the terminal, and sendthe RTCP packet to the peer end.

RTCP defines a plurality of types of RTCP packets to transmit differentcontrol information, including source description items (SourceDescription Items, SDES) packets. SDES packets are used to describe asource that sends RTCP packets. FIG. 9 is a schematic diagram of astructure of an SDES packet. The SDES packet includes a header (header)and zero or more report chunks (chunk).

The header sequentially includes RTP and RTCP version numbers (Version,V), a quantity of padding bits (Padding, P), a quantity of source counts(Source Count, SC), a packet type (Packet Type, PT), and a packet length(length). For example, in the SDES packet shown in FIG. 9 , V=2, P=1,SC=5, PT=SDES=202, and length=16.

The report block includes a synchronous source/contributing source(Synchronization source/Contributing source, SSRC/CSRC) identifier(identifier), and zero or more source description items (Item). Thesource description items carry information about the SSRC/CSRC. Thesource description items further include a plurality of types, forexample, a canonical name (Canonical Name, CNAME) source descriptionitem, a user name source description item, an email address sourcedescription item, a phone number source description item, a user addresslocation source description item, a tool source description item, anotification/status source description item, and a private extendedsource description item.

The first terminal may write the IP address and the port number of thefirst terminal into any one of the foregoing source description items.For example, the first terminal writes the IP address and the portnumber into the CNAME source description item. When the IP address ofthe first terminal is 10.184.44.211 and the port number is 25096, astructure of the CNAME source description item may be, for example, asshown in FIG. 10 , carrying the foregoing IP address and port number.

S802: The second terminal sends an IP address and a port number of thesecond terminal to the first terminal.

In a possible implementation, after receiving the IP address and theport number of the first terminal, the second terminal writes the IPaddress and the port number of the second terminal into an RTCP packetsent by the second terminal, and sends the RTCP packet to the firstterminal. For a specific manner, refer to a manner of sending the IPaddress and the port number of the first terminal in step S801. Detailsare not described herein again in this embodiment.

In another possible implementation, the second terminal may alsoactively detect the auxiliary link establishing condition, and afterdetecting the auxiliary link establishing condition, actively write theIP address and the port number of the second terminal into the RTCPpacket sent by the second terminal, and send the RTCP packet to thefirst terminal.

S803: Establish an auxiliary link based on the IP address and the portnumber of the first terminal and the IP address and the port number ofthe second terminal.

After receiving the IP address and the port number of the secondterminal, the first terminal sends a second link detection command tothe second terminal, so as to detect whether the IP address and the portnumber of the second terminal can be used to successfully receive themessage. Similarly, after receiving the IP address and the port numberof the first terminal, the second terminal sends a first link detectioncommand to the first terminal, so as to detect whether the IP addressand the port number of the first terminal can be used to successfullyreceive the message.

If the first terminal can receive a second response message that isabout a second detection command and returned by the second terminal,and the second terminal can also receive a first response message thatis about a first detection command and returned by the first terminal,it indicates that the point-to-point auxiliary link is smooth, and theauxiliary link is successfully established.

In some embodiments, the point-to-point auxiliary link is in aunidirectional transmission mode. Therefore, in a process ofestablishing the point-to-point auxiliary link, the first terminal andthe second terminal may send only an IP address and a port number of aterminal used to receive a call data packet on the auxiliary link to atransmit end of the call data packet. The transmit end performsunidirectional link detection based on the IP address and port number,and the point-to-point auxiliary link is established.

For example, when the point-to-point auxiliary link is only used to senda call data packet from the first terminal to the second terminal, thesecond terminal may send only the IP address and the port number of thesecond terminal to the first terminal, and the first terminal completeslink detection based on the IP address and the port number, so that thepoint-to-point auxiliary link is established.

Alternatively, when the point-to-point auxiliary link is only used tosend a call data packet from the second terminal to the first terminal,the first terminal may send only the IP address and the port number ofthe first terminal to the second terminal, and the second terminalcompletes link detection based on the IP address and the port number, sothat the point-to-point auxiliary link is established.

Optionally, the first terminal and the second terminal may not establishthe point-to-point auxiliary link through negotiation based on theprimary link, but through negotiation by using the server. After thenegotiation succeeds by using the server, point-to-point communicationbased on Wi-Fi or a data service is performed. The method does notincrease data transmission pressure of the primary link, avoidsaffecting call quality in the process of establishing the auxiliarylink, and has relatively good user experience.

After the point-to-point auxiliary link is successfully established, thefirst terminal and the second terminal may communicate by using any oneof the following four client/server (Client/Server, C/S) modes.

(1) The first terminal serves as a client, and the second terminalserves as a server. In mode (1), the first terminal first sends the calldata packet to the second terminal, and after receiving the call datapacket sent by the first terminal, the second terminal starts to sendthe call data packet to the second terminal.

(2) The second terminal serves as a client, and the first terminalserves as a server. In mode (2), the second terminal first sends thecall data packet to the first terminal, and after receiving the calldata packet sent by the second terminal, the first terminal starts tosend the call data packet to the first terminal.

(3) The first terminal and the second terminal serve as both a clientand a server. In mode (3), the auxiliary link includes two sublinks. Onesublink is used to send the call data packet of the first terminal tothe second terminal, and the other sublink is used to send the call datapacket of the second terminal to the first terminal. In mode (3), thefirst terminal and the second terminal can isolate receiving and sendingof the call data packet.

(4) The first terminal and the second terminal serve as clients at thesame time. In mode (4), the first terminal and the second terminalsimultaneously receive and send a call data packet by using one sublink.

In the point-to-point auxiliary link, the terminal may transmit the calldata packet by using a user datagram protocol (User Datagram Protocol,UDP) or a transmission control protocol (Transmission Control Protocol,TCP). According to the UDP or TCP, the terminal may directly send thecall data packet to the target terminal based on the IP address and theport number of the peer end.

Because the UDP protocol cannot ensure that a transmitted call datapacket can definitely be delivered, in a possible implementation, animportant call data packet may be retransmitted and acknowledged toavoid loss of the important call data packet. For example, for the calldata packets collected by the first terminal in a call quality abnormalstate, to ensure that the call data packets are delivered to the secondterminal, the first terminal may redundantly send these call datapackets for a plurality of times, and stop redundant sending afterreceiving response messages that are about these call data packets andthat are returned by the second terminal. When the call quality isnormal, the data packets are not retransmitted or acknowledged.

In addition, when the primary link of the terminal does not use theRTP/RTCP technology to make a call, or when two terminals are located indifferent gateways or affected by firewall settings, the terminals maynot be able to access each other based on the IP address and port numberof each other. In this case, the terminal may use a network addresstranslation (Network Address Translators) NAT technology, so that the IPaddress and the port number of the terminal can be accessed by the otherparty. Alternatively, the NAT technology is used to translate the IPaddress and the port number of the terminal into the IP address and theport number that can be accessed by the other party, so that the twoterminals can be connected successfully.

FIG. 11 is a schematic flowchart of establishing a server auxiliary linkaccording to this embodiment, including the following steps S1101 toS1103.

S1101: A first terminal sends an auxiliary link establishment request toa server, where the auxiliary link establishment request carries asecond feature identifier of a second terminal.

In this embodiment, the first terminal and the second terminal registerwith a same server. The auxiliary link establishment request is used torequest the second terminal to establish the auxiliary link by using theserver, so as to transmit a call data packet in relay mode by using theserver.

When carrying a second feature identifier of the second terminal, theauxiliary link establishment request usually further carries a firstfeature identifier of the first terminal. The first feature identifieris used to uniquely indicate the first terminal, and the second featureidentifier is used to uniquely indicate the second terminal. The firstfeature identifier and the second feature identifier may be an accountautomatically allocated by the server when the terminal registers withthe server, and the account is in a one-to-one correspondence with aregistration phone number of the server. Alternatively, the firstfeature identifier is the registered phone number of the server.

For example, the first terminal is a calling terminal. When the callingterminal establishes the auxiliary link, the phone has been dialed, andthe calling terminal knows a called phone number. Therefore, the callingterminal may obtain a calling phone number and the called phone numberlocally, and generate the auxiliary link establishment request.

For example, the first terminal is a called terminal. When establishingthe auxiliary link, the called terminal has received the INVITE sent bythe calling terminal on the primary link. Because the INVITE includesthe calling phone number and the called phone number, the calledterminal may obtain the calling phone number and the called phone numberlocally, and generate the auxiliary link establishment request.

S1102: The server sends the auxiliary link establishment request to thesecond terminal based on the second feature identifier.

Both the first terminal and the second terminal register with a sameserver, and can separately perform data transmission with the server.The server maintains a registration information table, including uniquefeature identifiers of all registered users. After receiving theauxiliary link establishment request, the server authenticates, based onthe first feature identifier in the request and the registrationinformation table, whether the first terminal has access permission. Ifthe user has the access right, the server determines whether the secondfeature identifier carried in the request is in the registrationinformation table. If the second feature identifier can be found in theregistration information table, the server sends the auxiliary linkestablishment request to the second terminal based on the second featureidentifier.

S1103: After receiving the auxiliary link establishment request, thesecond terminal sends a response message to the first terminal by usingthe server.

According to the foregoing steps S1101 to S1103, the auxiliary link maybe established between the first terminal and the second terminal byusing the server, and the call data packet is transmitted between thefirst terminal and the second terminal by using the server.

By using the method for establishing the server auxiliary link shown inthe foregoing steps S1101 to S1103, reliability of the server auxiliarylink can be ensured, and a case in which the server auxiliary link failsto be established because a terminal cannot be connected to the serveris avoided to some extent.

In addition, in an example, the first terminal and the second terminaleach may actively establish a connection to the server at a preset timepoint, to form the server auxiliary link. For example, the preset timepoint may be a time point at which establishment of the primary linkstarts, a time point at which establishment of the primary linksucceeds, or the like. When the first terminal and the second terminalneed to transmit the call data packet by using the server auxiliarylink, the call data packet is sent to the server. After receiving thecall data packet, the server may forward the call data packet to acorresponding terminal.

It may be understood that, by establishing the server in advance, theterminal may enable the auxiliary link at any time during a call, andtransmit the call data packet by using the auxiliary link, therebyquickly improving call quality.

In an auxiliary link establishment process, regardless of thepoint-to-point auxiliary link or the server auxiliary link, the terminalmay establish the auxiliary link by using Wi-Fi or cellular data of asubscriber identity module (Subscriber Identity Module, SIM) card. For aterminal on which at least two SIM cards are installed, the auxiliarylink may be established by using cellular data of a SIM card thatcurrently provides a call service, or the auxiliary link may beestablished by using cellular data of another SIM card. This is notlimited in this embodiment.

The first terminal and the second terminal may establish a sameauxiliary link in a same network access manner, or may establish a sameauxiliary link in different network access manners. For example, thefirst terminal and the second terminal may jointly use Wi-Fi toestablish the auxiliary link. Alternatively, the first terminal usesWi-Fi, and the second terminal uses cellular data to establish theauxiliary link.

The first terminal or the second terminal may also preferably establishthe auxiliary link by using Wi-Fi. For example, when a user is at homeor works in a company, indoor network signals are weak due to buildingblocking. In this case, Wi-Fi can be preferably used to establish theauxiliary link. When Wi-Fi signals are weak or Wi-Fi cannot beconnected, cellular data can be used to establish the auxiliary link.

After the auxiliary link is established, the first terminal and thesecond terminal may always use the auxiliary link to transmit the calldata packets until the call ends since the auxiliary link issuccessfully established. Alternatively, the auxiliary link may be usedto transmit the call data packets only in a process in which the callquality of the primary link is abnormal. This is not limited in thisembodiment.

In addition, optionally, referring to Table 1, when the first terminaland the second terminal establish the auxiliary link by using Wi-Fi atthe same time, the auxiliary link may be put into use immediately afterbeing established, to transmit the call data packets until the callends. When at least one terminal in the call establishes the auxiliarylink by using cellular data, and when it is detected that call qualityis abnormal, the auxiliary link may be used to transmit the call datapackets, and after the call quality is normal, use of the auxiliary linkis suspended, so as to avoid consuming a large amount of cellular datatraffic of the user.

TABLE 1 Table of a data packet sending mode on an auxiliary linkAuxiliary link establishment mode First Second terminal terminal Calldata packet transmission mode Wi-Fi Wi-Fi Transmission since theauxiliary link is established Wi-Fi Cellular Transmission during callquality exception network Cellular Wi-Fi Transmission during callquality exception network Cellular Cellular Transmission during callquality exception network network

When the terminal establishes the auxiliary link by using cellular data,for a terminal on which two SIM cards are installed, one of the two SIMcards may be selected based on a current SIM card (that is, a call card)that provides a call service, and the auxiliary link is established byusing cellular data of the selected SIM card.

For example, if a secondary card is a current call card, cellular dataof a primary card is preferably used to establish the auxiliary link.

If the primary card is a call card, when a moving rate of the terminalis less than a rate threshold (for example, 10 Km/h), cellular data ofthe secondary card is preferably used when signal quality of the primarycard is poor, and cellular data of the primary card is preferably usedwhen signal quality of the primary card is relatively good. When themovement rate of the terminal is greater than the rate threshold, toavoid frequent handovers between cells of the auxiliary link and theprimary link at the same time, the cellular data of the secondary cardmay be preferably used to establish the auxiliary link.

For a scenario in which the terminal has only one SIM card, when theterminal uses cellular data to establish the auxiliary link, theterminal may first determine signal quality of the SIM card. If thesignal quality is less than a threshold, the terminal does not establishthe auxiliary link by using the cellular data. In addition, after theauxiliary link is established, if it is detected that a delay of a calldata packet on the auxiliary link is greater than a delay threshold, theauxiliary link is stopped to be used.

Optionally, after the auxiliary link is successfully established, thefirst terminal and/or the second terminal may separately detect MOSvalues of calls on the primary link and the auxiliary link, and select alink with a relatively high MOS value to perform a call. It should beunderstood that the link with the relatively high MOS value may be theprimary link, or may be the auxiliary link. In addition, the call linkmay be switched again during the call.

The following describes a process of transmitting call data packets onthe primary link and the auxiliary link.

In this embodiment, in a process in which the first terminal and thesecond terminal are in a call, a data transmission mode of the primarylink or the auxiliary link may be a unidirectional transmission mode, ormay be a bidirectional transmission mode. Certainly, the call datapackets may be transmitted on the primary link and the auxiliary link byusing the unidirectional transmission mode and the bidirectionaltransmission mode together. For example, the primary link transmits thecall data packets in the bidirectional transmission mode, and theauxiliary link transmits the call data packets in the unidirectionaltransmission mode.

For example, a user A makes a call by using the first terminal, and auser B makes a call by using the second terminal. During the callbetween the user A and the user B, the user A can clearly hear the userB's voice, but the user B cannot or cannot clearly hear the user A'svoice. This indicates that transmission of a call data packet from thesecond terminal to the first terminal is normal, but transmission of acall data packet from the first terminal to the second terminal isabnormal. In other words, unidirectional transmission of the call datapacket is abnormal. Therefore, the call data packet from the firstterminal to the second terminal may be transmitted only by using theauxiliary link.

For example, as shown in FIG. 12 or FIG. 13 , when the first terminaldetects that uplink call quality is abnormal but downlink call qualityis normal, the call data packets may be transmitted bidirectionallybetween the first terminal and the second terminal by using the primarylink, and the call data packets collected by the first terminal are sentto the second terminal only by using the auxiliary link. In FIG. 12 ,the primary link is a base station-based core network link, and theauxiliary link is a point-to-point auxiliary link. As shown in FIG. 13 ,the primary link is the base station-based core network link, and theauxiliary link is the server auxiliary link.

During a call, the terminal continuously collects call data packets ofthe user. Each call data packet has a sequence number, and the sequencenumber increases sequentially based on a time sequence of generation.

For example, in a talk spurt of the user (that is, in a process in whichthe user speaks), the terminal collects and generates a voice datapacket by using a microphone every 20 milliseconds (ms). A silence frameis generated every 160 ms during a silence period of the user (that is,during a pause in the user's speech). For a video call, when collectinga voice data packet, the terminal further collects and generates a videodata packet by using a camera at an interval of 43 ms.

FIG. 14A and FIG. 14B are a schematic diagram of a transmissionprinciple of a call data packet of a terminal, and shows a principle ofsending, by a terminal, call data packets by using a primary link and anauxiliary link. The following separately describes a process in whichthe terminal sends the call data packets to the primary link and theauxiliary link.

(1) The terminal sends a call data packet to the primary link.

The terminal collects call data of a user by using audio and videoperipherals, and encapsulates the call data by using an audio and videoprocessing module, to form the call data packet. Subsequently, the audioand video processing module sends the call data packet to an IMSprotocol stack of a modem (Modem), and selects a TCP/IP protocol fromthe IMS protocol stack to further encapsulate the call data packet.Finally, the call data packet is sent to a cellular network through anLTE air interface, and enters the primary link.

(2) The terminal sends a call data packet to the auxiliary link.

The call data packet on the auxiliary link may be obtained by allocatingor copying the call data packet on the primary link. The terminal maysend the call data packet to the auxiliary link through the followingpath 1 or path 2.

Path 1: The audio and video processing module sends the call data packetto the modem, and selects the TCP/IP protocol from the IMS protocolstack to further encapsulate the call data. Subsequently, through datarouting, the call data packet is sent to an IMS network adapter on anapplication chip (Application Processor, AP) side in a cross-corecommunication manner. After receiving the call data packet, the IMSnetwork adapter sends the call data packet to a voice peer module byusing the IP protocol stack. The voice peer module sends the call datapacket to the auxiliary link by using the IP protocol stack and a dataservice network interface card or a Wi-Fi network interface card.

When the path 1 is used, the audio and video processing module, the IMSprotocol stack, or data routing module may copy or allocate the calldata packet on the primary link, to obtain the call data packet of theauxiliary link.

Path 2: The audio and video processing module sends the call data packetof the auxiliary link to the voice peer module by using an audio andvideo media proxy on the AP side, and the voice peer module sends thecall data packet to the auxiliary link by using the IP protocol stackand the data service network adapter or the Wi-Fi network adapter.

When the path 2 is used, the audio and video processing module may copyor allocate the call data packet on the primary link, so as to obtainthe call data packet of the auxiliary link.

In addition, referring to FIG. 14A and FIG. 14B, a signaling path isfurther disposed in the terminal, and is configured to transmit controlsignaling between the application chip and a modem chip by using anattention (Attention, AT) command. For example, the application chipsends an IP address and a port number of the terminal to the modem chipby using the AT command, and the modem chip sends the IP address and theport number to the peer end by using the primary link. Alternatively,after receiving an IP address and a port number that are sent by thepeer end, the modem chip sends the IP address and the port number to theapplication chip by using an AT command. In addition, the path 1 and thepath 2 may also be used to transmit control signaling between theapplication chip and the modem chip.

In this embodiment, the terminal may send the call data packet to thepeer end in a replacement or supplement manner. The following describesmanners of configuring data packets on the primary link and theauxiliary link in the two manners. In a replacement manner, the mannerof configuring the call data packets on the primary link and theauxiliary link is a manner 1, that is, the call data packets on both theprimary link and the auxiliary link need to be kept complete. In thepacket supplementation manner, a manner of configuring the call datapackets on the primary link and the auxiliary link may be the manner 1,a manner 2, a manner 3, or a manner 4, and the primary link and theauxiliary link at least supplement each other.

Manner 1: Referring to FIG. 15 , after generating the call data packets,the terminal simultaneously transmits all the call data packets by usingthe primary link and the auxiliary link, so as to reduce a quantity ofcall data packets missing at a receive end. It may be understood that,in the manner 1, the primary link is used to transmit a plurality offirst call data packets, the auxiliary link is used to transmit aplurality of second call data packets, and the plurality of first calldata packets and the plurality of second call data packets arecompletely the same, or the plurality of first call data packets and theplurality of second call data packets have different encoding rules.

Manner 2: Referring to FIG. 16 , when the primary link is congested, theterminal may reduce a quantity of sent call data packets on the primarylink, and perform, by using the auxiliary link, compensation sending onthe call data packets discarded on the primary link, so as to reduce aquantity of transmitted data packets on the primary link. For example,one call data packet is discarded every time two call data packets aresent on the primary link, or one call data packet is discarded everytime three call data packets are sent, or one call data packet isdiscarded every time four call data packets are sent, so as to reducecall data packet transmission pressure on the primary link. It may beunderstood that, in the manner 2, the primary link is used to transmit aplurality of first call data packets, the auxiliary link is used totransmit a plurality of second call data packets, and the plurality offirst call data packets and the plurality of second call data packetsare totally different.

Manner 3: Referring to FIG. 17 , when congestion occurs on the primarylink, the terminal may copy some of the call data packets on the primarylink and transmit some of the call data packets by using the auxiliarylink, and reduce a transmission amount of the call data packets on theprimary link, so that transmission pressure of the call data packets onthe primary link is reduced. It may be understood that, in the manner 3,the primary link is used to transmit a plurality of first call datapackets, the auxiliary link is used to transmit a plurality of secondcall data packets, and only some of the plurality of first call datapackets and the plurality of second call data packets are the same.

In manners 1 to 3, a sum of all first call data packets transmitted onthe primary link and all second call data transmitted on the auxiliarylink includes all call data collected by a transmit end.

Manner 4: Referring to FIG. 18 and FIG. 19 , in a video call process,the terminal may transmit a voice data packet by using a primary linkand transmit a video data packet by using an auxiliary link; or transmita video data packet by using a primary link and transmit a voice datapacket by using an auxiliary link.

It should be noted that the auxiliary link may be used only to transmita call data packet, but not to transmit a silence frame. In a process ofcopying the call data packet, the terminal copies the call data packettogether with a sequence number of the call data packet.

For example, the first terminal sends the call data packet to the secondterminal. For the primary link, after collecting a PCM data stream, thefirst terminal device usually further encodes the PCM data stream, forexample, performs Opus, AMR-WB, Opus, AMR-NB, AMR-WB, or EVS encoding,encapsulates the PCM data stream into a first RTP data packet by usingan IMS protocol stack, and sends the first RTP data packet to the secondterminal. The call data packet transmitted on the auxiliary link may bea first RTP data packet copied or allocated on the primary link, or maybe a second RTP data packet, where the second RTP data packet isobtained by directly encapsulating the PCM data stream. In thisembodiment, the IMS protocol stack includes an RTP/RTCP protocol stack.

For the replacement manner, the call data in the RTP call data packet ofthe auxiliary link may be a PCM data stream; or may be call data with abetter encoding rule, where the encoding rule of the call data isusually different from that of the primary link; or may be a PCM datastream on which lossless encoding is performed. A lossless encodingmanner may be Huffman (Huffman) encoding or the like.

An example in which the RTP call data packet is a PCM data stream isused. Refer to FIG. 20 . The first terminal separately sends the calldata packets with different encoding rules to the second terminal byusing the primary link and the auxiliary link by using the IM protocolstack. After receiving the call data packets of the primary link and theauxiliary link, optionally, when the call quality of the primary link isabnormal, the second terminal uses the call data packet of the auxiliarylink and discards the call data packet of the primary link; and when thecall quality of the primary link is normal, the second terminalcontinues to use the call data packet of the primary link.Alternatively, the second terminal directly discards the call datapacket of the primary link, and uses only the call data packet of theauxiliary link.

In packet supplement mode, the call data packet of the auxiliary link isallocated or copied from the primary link. The encoding rule of theauxiliary link is the same as that of the primary link. The encodingrule includes a sampling rate, an encoding mode, an encoding rate,encoding quality, resolution, a frame rate, and the like. Refer to FIG.21 . After collecting the call data packets, the first terminal mayallocate the call data packets of the primary link and the auxiliarylink in any one of the manner 1 to the manner 4. Subsequently, the firstterminal separately sends the call data packets to the second terminalby using the primary link and the auxiliary link by using the IMSprotocol stack. After receiving the call data packets of the primarylink and the auxiliary link, the second terminal combines the two calldata packets. In this embodiment, in the call process, an operator callfee of the primary link is not affected, and the operator call fee isnot charged for the auxiliary link.

Optionally, when the auxiliary link is a Wi-Fi link, the terminal devicepreferably transmits an original PCM data stream of the call data. Whenbandwidth is limited, the terminal device encodes the original PCM datastream by using an Opus format, and then transmits the encoded originalPCM data stream (a code rate maybe 32 kbps).

Optionally, when the auxiliary link is a cellular data link, theterminal device preferably uses the Opus format to encode the originalPCM data stream before transmission. In addition, some users (forexample, users who consume relatively large traffic each month) maystill preferably transmit the original PCM data stream of the call data.When bandwidth is limited, the original PCM data stream is encoded byusing the Opus format before transmission (a code rate maybe 32 kbps).

When the call data packet is sent by using the primary link or theauxiliary link, the first terminal and/or the second terminal mayfurther determine an encoding rule of the call data packet in the linkbased on uplink call quality parameters of the link, for example,parameters such as a sampling rate, an encoding rate, encoding quality,resolution, a frame rate, and a quantity of sound channels.

Specifically, for example, the transmit end is the first terminal, andthe first terminal may detect an uplink call quality parameter of thefirst terminal. When the uplink call quality parameter falls within apreset range, the first terminal keeps parameters such as a samplingrate, an encoding rate, encoding quality, resolution, a frame rate, or aquantity of sound channels of the sent call data packet unchanged. Whenthe uplink call quality parameter is better than the preset range andcontinues to be optimized, the first terminal increases parameters suchas a sampling rate, an encoding rate, encoding quality, resolution, aframe rate, and a quantity of sound channels. When the uplink callquality parameter is worse than the preset range and continues to becomeworse, the first terminal reduces parameters such as a sampling rate, anencoding rate, encoding quality, resolution, a frame rate, and aquantity of sound channels of the sent call data packet.

By using the call data packet sending manner provided in thisembodiment, at least one of the encoding rate, the encoding quality, andthe sampling rate of the call data packet may be adjusted based on linkquality, so that call quality of the first terminal and the secondterminal is maintained in an optimal state as much as possible.

For example, for voice data packets in a voice call and a video call,the first terminal may detect an uplink call quality parameter of thevoice. If the uplink call quality parameter of the voice changes withinthe preset range, the encoding rate, the encoding quality, and thesampling rate of the current voice remain unchanged. Different codingschemes of the voice have different coding quality. The coding schemesof the voice may include PCM, Opus, AMR-NB, AMR-WB, EVS coding, and thelike. In addition, the coding quality increases in an order of PCM,Opus, AMR-NB, AMR-WB, and EVS coding. The sampling rate of the voice maybe 8 kHz (kilohertz), 16 kHz, 32 kHz, or the like. A higher samplingrate indicates a clearer voice.

In this embodiment, a preset range of the uplink call quality parameterof the voice is pre-configured. For example, the pre-configuration ofthe preset range may include that an uplink air interface transmissionrate ranges from 10 to 20 kilobits per second (kbps), a packet loss rateranges from 0 to 1%, a delay ranges from 0 to 100 ms, and the like.

When detecting that a current uplink call quality parameter of the voiceon the primary link or the auxiliary link is better than the presetrange and continues to be optimized, the first terminal improves anencoding rate and encoding quality of the voice data packet. Forexample, an encoding rate of voice data in the voice data packet isincreased from 12.65 kbps to 23.85 kbps, and an encoding manner of thevoice data in the voice data packet is sequentially changed based on anorder of PCM, Opus, AMR-NB, AMR-WB, and EVS encoding, so as to improvecurrent call quality. Alternatively, the sampling rate of the voice datais gradually increased, for example, from 8 kHz to 16 kHz.

When detecting that the current uplink call quality parameter of thevoice on the primary link or the auxiliary link is worse than the presetrange and continues to become worse, the first terminal reduces anencoding rate and encoding quality of the voice data packet. Forexample, the coding rate of the voice data packet is reduced from 23.85kbps to 6.6 kbps, and coding manners of the voice data packet aresequentially changed based on an order of EVS, AMR-WB, and AMR-NBcoding, so as to improve current call quality. Alternatively, thesampling rate of the voice data is gradually reduced, for example, from16 kHz to 8 kHz.

In a possible implementation, for the voice data packet, when theprimary link uses a low coding rate, a low-quality coding scheme, or alow sampling rate (for example, an encoding rate is 4.75 kbps, anencoding scheme is AMR-NB, and a sampling rate is 8 kHz), the auxiliarylink may use a high coding rate and a high-quality coding scheme (forexample, an encoding rate is 24.4 kbps, an encoding scheme is EVS, and asampling rate is 16 kHz).

For a video data packet in a video call, if an uplink call qualityparameter of the video changes within the preset range, an encodingrate, encoding quality, resolution, a frame rate, and the like of thecurrent video are maintained. Different coding schemes of the video havedifferent coding quality. The coding schemes of the video may includeH264, H265, H266, and the like. In addition, the coding quality of thevideo increases sequentially in an order of H264, H265, and H266.Resolution of the video maybe a video graphics array (Video GraphicsArray, VGA), 720P, 1080P, or the like, and the resolution of the videois increasingly high in an order of VGA, 720P, and 1080P. A frame rateof the video maybe 15 fps (frame per second), 22 fps, 30 fps, or thelike, and a larger frame rate indicates a smoother video.

In this embodiment, the preset range of the uplink call qualityparameter of the video is pre-configured. For example, the uplink callquality parameter may include an uplink air interface transmission rateranging from 10 kbps to 20 kbps, a packet loss rate ranging from 0 to0.1%, a delay ranging from 0 ms to 150 ms, and the like.

When it is detected that on the primary link and/or the auxiliary link,the current uplink call quality parameter of the video is better thanthe preset range, and continues to be optimized, at least one of acurrent encoding rate, encoding quality, resolution, and a frame rate ofthe video in the video data packet is improved. For example, theencoding rate of the video in the video data packet is increased from800 kbps to 1200 kbps, and an encoding manner is sequentially changedbased on an order of H264 encoding and H265 encoding, so as to improve acurrent call. Alternatively, the resolution of the video is increased,for example, from 720P to 1080P, so as to improve image quality of thevideo. Alternatively, a frame rate of the video is increased, forexample, from 22 fps to 30 fps, to improve smoothness of video watching.

When it is detected that on the primary link or the auxiliary link, thecurrent uplink call quality parameter of the video is worse than thepreset range and continues to become worse, at least one of a currentencoding rate, encoding quality, resolution, or frame rate of the videodata packet is reduced. For example, the encoding rate of the video datapacket is reduced from 800 kbps to 600 kbps, and an encoding manner issequentially changed based on an order of H265 encoding and H264encoding, so as to improve current call quality. Alternatively, theresolution of the video is reduced, for example, from 1080P to 720P.Alternatively, the frame rate of the video is reduced, for example, from30 fps to 22 fps.

In a possible implementation, for a video data packet, when the primarylink uses a low encoding rate, a low-quality encoding scheme, a lowresolution, or a frame rate (for example, the encoding rate is 600 kbps,the encoding scheme is H264, the resolution is 720P, and the frame rateis 15 fps), the auxiliary link may use a high encoding rate and ahigh-quality encoding scheme (for example, the encoding rate is 1000kbps, the encoding scheme is H265, the resolution is 1080P, and theframe rate is 22 fps).

To ensure security and reliability of data packet transmission on theprimary link and the auxiliary link, the first terminal and the secondterminal may encrypt the call data packet according to a presetencryption rule and then send the encrypted call data packet to a peerend. The receive end decrypts the call data packet according to acorresponding decryption rule.

After receiving call data packets from at least two links, the firstterminal and/or the second terminal need/needs to performpost-processing on the call data packets. The post-processing includescombining, deduplicate, and sorting the call data packets. Thecombination refers to processing the call data packets received on theat least two links into one link. Deduplication is to delete redundantcall data packets with a same sequence number and retain only one ofthem. Sorting refers to arranging the call data packets in ascendingorder of sequence numbers.

Usually, sequence numbers of the call data packets do not change in asending process, and the sequence numbers of the call data packetsreceived by the terminal by using the two links are of a same type. Inthis case, call data packets of all links are aggregated to completecombination, and then deduplication and sorting are performed in aunified manner.

However, in some embodiments, in a transmission process of some links,the sequence numbers of the call data packets maybe converted intosequence numbers of another type. In this case, sequence number types ofthe call data packets received by the terminal by using the at least twolinks may be different, and the terminal cannot directly combine thecall data packets based on the sequence numbers. For example, after acall data packet is transmitted across operators on the primary link, asequence number of the call data packet may be converted into a sequencenumber of another operator.

Therefore, in a possible implementation, when receiving the call datapackets with different types of sequence numbers, the terminal combinesthe call data packets based on a link quality parameter of a receivelink.

For example, the first terminal and/or the second terminal may determinelink quality parameters of the primary link and each auxiliary link;determine an optimal call link based on the link quality parameters; anduse call data packets received from the optimal call link as a combinedcall data packet. In other words, the call data packets received on theoptimal call link are reserved, and call data packets received onremaining links are discarded, so that call data packets on a pluralityof links are processed as the call data packets on one link. The linkquality parameter may include a packet loss rate, a jitter, a delay, andthe like of the call data packet. It should be understood that, in thisembodiment, based on different link quality parameters, the optimal calllink may be the primary link or the auxiliary link.

For another example, the first terminal and/or the second terminal maydetermine the link quality parameter of the primary link and the linkquality parameter of each auxiliary link; and determine at least twoauxiliary links based on the link quality parameters. If comprehensivecall quality of the at least two auxiliary links is higher than callquality of the primary link, call data packets on the at least twoauxiliary links are combined, and call data packets of the primary linkand other auxiliary links are discarded, so that call data packets on aplurality of links are processed as the call data packets on one link.

In another possible implementation, when receiving call data packetshaving different types of sequence numbers, the terminal may performaudio and video feature fusion on the call data packets to obtain afused call data packet, and use the fused call data packet as thecombined call data packet. For example, the audio and video feature maybe a voice waveform, a video picture feature, or the like.

In conclusion, by using the auxiliary-link-based call compensationmethod provided in this embodiment, the call data packets may betransmitted by using the auxiliary link and the primary link. The methodcan not only improve problems such as call discontinuity, no sound, andvideo freezing caused by a network signal exception, but also improvecurrent call quality of the terminal to some extent even if an accessnetwork element or a core network device is abnormal during a call.

In addition, usually, when the terminal makes a call by using theprimary link alone, if no downlink call data packet is received within apreset time period (for example, 20 seconds), the terminal automaticallydrops the current call.

Therefore, in the auxiliary link compensation call method provided inthis embodiment, even if the primary link is interrupted because theterminal cannot receive the downlink call data packet of the primarylink within the preset time segment, the auxiliary link can still beused to transmit the call data packet between the two call terminals,thereby ensuring normal progress of the current call.

Currently, many terminals are provided with two microphones that are faraway from each other. During a call, the two microphones collect calldata at different locations at the same time. In this embodiment, calldata of a first microphone maybe used as left channel call data, andcall data collected by a second microphone may be used as right channelcall data.

Refer to FIG. 22 . In an auxiliary link compensation call process, thefirst terminal may jointly encode the left channel call data and theright channel call data by using an encoding unit, process the leftchannel call data and the right channel call data into one call datapacket, and send the call data packet to the second terminal by usingthe auxiliary link. After receiving the call data packet of theauxiliary link, the second terminal may decode the call data packet byusing a decoding unit, separate the left channel call data and the rightchannel call data from the call data packet, and separately play theleft channel call data and the right channel call data by using a firstplaying component (for example, a left headset and a left sound box) anda second playing component (for example, a right headset and a rightsound box), thereby implementing a stereo effect of a call at thereceive end.

Alternatively, referring to FIG. 23 , in an auxiliary link compensationcall process, the first terminal may encode the left channel call databy using an encoding unit 1, and send the encoded left channel call datato the second terminal by using an auxiliary link 1; and encode theright channel call data by using an encoding unit 2, and send theencoded right channel call data to the second terminal by using anauxiliary link 2. After receiving the call data packets of the twoauxiliary links, the second terminal may use the decoding unit 1 todecode a call data packet on the auxiliary link 1, and play, by usingthe first playing component (for example, a left headset or a left soundbox), the left channel call data through decoding. In addition, thesecond terminal further decodes, by using the decoding unit 2, the calldata packet received by using the auxiliary link 2, and plays, by usingthe second playing component (for example, a right headset or a rightsound box), the right channel call data obtained through decoding, so asto implement a stereo effect of a call at the receive end.

It should be noted that, in this embodiment, the first playing componentand the second playing component may further belong to differentdevices. For example, the first playing component is a speaker of thereceive-end device (for example, the second terminal), and the secondplaying component is a mono headset connected to the receive-end device.

In addition, the technical solutions used in the embodiments of thisapplication may be further extended to a scenario in which the terminaluses an internet-based application service communication (over the top,OTT) technology to make a call. When the terminal makes an OTT call, theaccess network device may be a base station or a Wi-Fi device. OTT meansthat internet companies develop various video and data services based onthe open internet across an operator.

In a process in which the first terminal and the second terminal performthe OTT call, the primary link may be a point-to-point auxiliary linkestablished according to an IP protocol or a D2D protocol, or may be aserver auxiliary link established according to an IP protocol or a D2Dprotocol. When the first terminal meets an auxiliary link establishmentcondition, the first terminal establishes at least one auxiliary linkwith the second terminal, where the auxiliary link is different from theprimary link. For example, when the primary link is the point-to-pointauxiliary link established according to the IP protocol, the serverauxiliary link established according to the IP protocol is furtherestablished, so as to transmit a call data packet by using a pluralityof links, thereby improving quality of an OTT call and further improvinguser experience.

It should be noted that, in this embodiment, for the auxiliary linkestablishment condition, an establishment process, and a mode of usingthe primary link and the auxiliary link by the first terminal and thesecond terminal after the auxiliary link is established, refer to theforegoing description. Details are not described herein again in thisembodiment.

In addition, the auxiliary link compensation call method provided inthis embodiment may also be extended to a scenario in which data istransmitted between two devices (that is, Bluetooth devices) having aBluetooth communication function by using Bluetooth. For example, theBluetooth device maybe a smartphone, a notebook computer, a Bluetoothheadset, a Bluetooth sound box, an in-vehicle Bluetooth device, aBluetooth digital audio player, a Bluetooth memory, or the like. This isnot limited in this embodiment. For example, in a scenario, the mobilephone sends a call data packet to the Bluetooth headset when the mobilephone answers a call by using the Bluetooth headset in a call process.

In a Bluetooth communication process, the first Bluetooth device and thesecond Bluetooth device usually establish a Bluetooth link, that is, aprimary link, and transmit data by using the primary link. However, in adata transmission process, call quality may be abnormal, such as a datapacket loss, jitter, and a relatively large delay, due to reasons, forexample, a relatively weak Bluetooth signal.

Therefore, in a possible implementation, when detecting that a Bluetoothsignal is relatively weak, the first Bluetooth device or the secondBluetooth device may further establish at least one auxiliary Bluetoothlink, so that the first Bluetooth device and the second Bluetooth devicecan jointly transmit data by using the primary Bluetooth link and the atleast one auxiliary Bluetooth link, thereby improving data transmissionefficiency.

Optionally, the auxiliary Bluetooth link may be a link established bythe first Bluetooth device and the second Bluetooth device by using aWi-Fi connection, or may be a point-to-point link established accordingto an IP address and a port number. This is not limited in thisembodiment.

It should be understood that sequence numbers of the steps do not meanan execution sequence in the foregoing embodiments. The executionsequence of the processes should be determined based on functions andinternal logic of the processes, and should not constitute anylimitation on the implementation processes of embodiments of thisapplication.

This embodiment further provides an auxiliary-link-based callcompensation system. The system includes the foregoing first terminal,second terminal, and core network device. The system can execute theforegoing auxiliary-link-based call compensation method provided in thisembodiment.

This embodiment further provides an auxiliary-link-based callcompensation apparatus. The apparatus is applied to the foregoing firstterminal, and is configured to control the first terminal to perform theauxiliary-link-based call compensation method provided in the foregoingembodiment.

This embodiment provides a computer-readable storage medium. Thecomputer-readable storage medium stores a computer program. When thecomputer program is executed by a processor, the foregoingauxiliary-link-based call compensation method provided in thisembodiment is implemented.

This embodiment provides a computer program product, where the programproduct includes a program, and when the program is run by a device, aterminal device is enabled to implement the auxiliary-link-based callcompensation method provided in the foregoing embodiment.

This embodiment further provides a terminal device, where the terminaldevice is configured to execute the auxiliary-link-based callcompensation method provided in the foregoing embodiment. The functionmay be implemented by hardware, or may be implemented by hardwareexecuting corresponding software. The hardware or the software includesone or more modules corresponding to sub-functions in the function.Optionally, the terminal device may be user equipment.

This embodiment further provides a chip. Refer to FIG. 24 . The chip isapplied to the foregoing first terminal, and includes a memory and aprocessor. The processor executes a computer program stored in thememory, to control the first terminal to perform theauxiliary-link-based call compensation method provided in the foregoingembodiment.

An embodiment of this application further provides an auxiliarylink-based communications system, including a first terminal and asecond terminal. The first terminal and the second terminal perform OTTcommunication, and establish a primary link. The first terminal isconfigured to: establish at least one auxiliary link to the secondterminal in response to an auxiliary link establishment condition, wherethe auxiliary link is different from the primary link; obtain PCM datastreams of call data; generate call data packets based on the PCM datastreams; and transmit the call data packets with the second terminal byusing the primary link and the at least one auxiliary link.

It should be noted that, in a communication process of the system, abottom-layer PCM data stream obtaining module (for example, a digitalsignal processor (Analog Device Instrument, ADSP) or an audio recordingmodule (audio record)) may directly obtain PCM data streams of a call,and send the PCM data streams to a communication peer end, withoutcopying and playing a voice packet by using an OTT application layer, soas to reduce impact on an original OTT call link.

An embodiment of this application further provides an auxiliarylink-based communications system, including a first terminal and asecond terminal. The first terminal and the second terminal areconnected by using Bluetooth, and establish a primary link. The firstterminal is configured to: establish at least one auxiliary link withthe second terminal in response to an auxiliary link establishmentcondition, where the auxiliary link is different from the primary link;and transmit data packets with the second terminal by using the primarylink and the at least one auxiliary link.

Optionally, the auxiliary link establishment condition includes: callquality of the primary link is abnormal; or a Bluetooth signal strengthof the first terminal is less than a strength threshold. The auxiliarylink is a Wi-Fi link or a data service link.

It should be understood that, the processor mentioned in embodiments ofthis application may be a central processing unit (Central ProcessingUnit, CPU), or may be another general purpose processor, a digitalsignal processor (Digital Signal Processor, DSP), anapplication-specific integrated circuit (Application Specific IntegratedCircuit, ASIC), a field programmable gate array (Field Programmable GateArray, FPGA), or another programmable logic device, discrete gate ortransistor logic device, discrete hardware component, or the like. Thegeneral-purpose processor may be a microprocessor, or the processor maybe any conventional processor or the like.

It may be understood that the memory mentioned in embodiments of thisapplication may be a volatile memory or a nonvolatile memory, or mayinclude a volatile memory and a nonvolatile memory. The nonvolatilememory may be a read-only memory (Read-Only Memory, ROM), a programmableread-only memory (Programmable ROM, PROM), an erasable programmableread-only memory (Erasable PROM, EPROM), an electrically erasableprogrammable read-only memory (Electrically EPROM, EEPROM), or a flashmemory. The volatile memory may be a random access memory (Random AccessMemory, RAM), used as an external cache. Through example but notlimitative descriptions, many forms of RAMs may be used, for example, astatic random access memory (static RAM, SRAM), a dynamic random accessmemory (dynamic RAM, DRAM), a synchronous dynamic random access memory(synchronous DRAM, SDRAM), a double data rate synchronous dynamic randomaccess memory (double data rate SDRAM, DDR SDRAM), an enhancedsynchronous dynamic random access memory (enhanced SDRAM, ESDRAM), asynchlink dynamic random access memory (synchlink DRAM, SLDRAM), and adirect rambus random access memory (direct rambus RAM, DR RAM).

It may be clearly understood by a person skilled in the art that, forthe purpose of convenient and brief description, for a detailed workingprocess of the foregoing system, apparatus, and unit, refer to acorresponding process in the foregoing method embodiments. Details arenot described herein again.

Cross reference may be performed between related parts between themethod embodiments of this application; and apparatuses provided in theapparatus embodiments are configured to perform the methods provided incorresponding method embodiments. Therefore, the apparatus embodimentsmay be understood with reference to related parts in the related methodembodiments.

The structural diagrams of the apparatuses provided in the apparatusembodiments of this application show only simplified designs ofcorresponding apparatuses. In actual application, the apparatus mayinclude any quantity of transmitters, receivers, processors, memories,and the like, so as to implement functions or operations performed bythe apparatus in the apparatus embodiments of this application, and allapparatuses that can implement this application fall within theprotection scope of this application.

In conclusion, the foregoing descriptions are merely specificimplementations of this application, but are not intended to limit theprotection scope of this application. Any variation or replacementwithin the technical scope disclosed in this application shall fallwithin the protection scope of this application. Therefore, theprotection scope of this application shall be subject to the protectionscope of the claims.

1-53. (canceled)
 54. An auxiliary-link-based call compensationapparatus, wherein the apparatus is configured to control a firstterminal to perform: establishing at least one auxiliary link with asecond terminal in response to an auxiliary link establishmentcondition, wherein the first terminal and the second terminal areconnected through a primary link established using a core networkdevice, and wherein the auxiliary link is different from the primarylink; and transmitting call data packets with the second terminal byusing the primary link and the at least one auxiliary link.
 55. Theapparatus according to claim 54, wherein the auxiliary link is one of: apoint-to-point auxiliary link established according to an IP protocol ora D2D protocol; a server auxiliary link established according to an IPprotocol or a D2D protocol; a core network link based on a base station,wherein both the first terminal and the second terminal are connected tothe core network device by using the base station; or a core networklink based on a Wi-Fi device, wherein both the first terminal and thesecond terminal are connected to the core network device by using theWi-Fi device.
 56. The apparatus according to claim 55, wherein theprimary link is a core network link based on the base station or a corenetwork link based on the Wi-Fi device.
 57. The apparatus according toclaim 54, wherein the auxiliary link establishment condition comprisesat least one of: the first terminal receives a dialing operation enteredby a user; the first terminal displays a ringing interface; the firstterminal receives a call answering operation entered by a user; thefirst terminal is currently in an abnormal geographical location; thefirst terminal is being handed over from a first abnormal cell to asecond abnormal cell; or call quality of the first terminal is abnormalon the primary link; wherein the abnormal geographical location, thefirst abnormal cell, and the second abnormal cell are determined by thefirst terminal based on a historical call process of the first terminal.58. The apparatus according to claim 57, wherein the auxiliary linkestablishment condition is that the call quality of the first terminalis abnormal on the primary link, and wherein that the call quality isabnormal comprises one of: uplink/downlink quality is abnormal;uplink/downlink data transmission quality is abnormal; an encodingformat of the call data packet is a preset encoding format on theprimary link; or at least one of a sampling rate, an encoding rate,encoding quality, resolution, a frame rate, a quantity of soundchannels, or a MOS value of the call data packet is less than arespective corresponding threshold on the primary link.
 59. Theapparatus according to claim 55, wherein, based on the auxiliary linkbeing the point-to-point auxiliary link, that the first terminalestablishes the auxiliary link with the second terminal comprises: thefirst terminal sends an IP address and a port number of the firstterminal to the second terminal by using the primary link; the firstterminal receives a first link detection command sent by the secondterminal, wherein the first link detection command indicates whether theIP address and the port number of the first terminal can be used tosuccessfully receive a message; and the first terminal sends a firstresponse message to the second terminal based on the first linkdetection command.
 60. The apparatus according to claim 55, wherein,based on the auxiliary link being the point-to-point auxiliary link,that the first terminal establishes the auxiliary link with the secondterminal comprises: the first terminal receives an IP address and a portnumber of the second terminal by using the primary link; the firstterminal sends a second link detection command to the second terminal,wherein the second link detection command indicates whether the IPaddress and the port number of the second terminal can be used tosuccessfully receive a message; and the first terminal receives a secondresponse message sent by the second terminal, wherein the first terminalresponds to the second link detection command based on the secondresponse message.
 61. The apparatus according to claim 55, wherein,based on the auxiliary link being the server auxiliary link, that thefirst terminal establishes the auxiliary link with the second terminalcomprises: the first terminal sends an auxiliary link establishmentrequest to a server, wherein the auxiliary link establishment requestcarries a second feature identifier of the second terminal, and whereinthe server sends the auxiliary link establishment request to the secondterminal based on the second feature identifier; and the first terminalreceives a response message sent by the second terminal, wherein thefirst terminal responds to the auxiliary link establishment requestbased on the response message.
 62. The apparatus according to claim 55,wherein, based on the auxiliary link being the server auxiliary link,that the first terminal establishes the auxiliary link with the secondterminal comprises: after the primary link is established, the firstterminal and the second terminal each actively establish a connection toa server to form the server auxiliary link.
 63. The apparatus accordingto claim 54, wherein that the first terminal transmits the call datapackets with the second terminal by using the primary link and the atleast one auxiliary link comprises: the first terminal sends call datapackets to the second terminal by using the primary link and the atleast one auxiliary link; and the first terminal receives, by using theprimary link and the at least one auxiliary link, call data packets sentby the second terminal.
 64. The apparatus according to claim 63, whereinthat the first terminal sends the call data packets to the secondterminal by using the primary link and the at least one auxiliary linkcomprises: the first terminal sends a plurality of first call datapackets to the second terminal by using the primary link, and sends aplurality of second call data packets to the second terminal by usingthe at least one auxiliary link; wherein the plurality of first calldata packets and the plurality of second call data packets arecompletely the same, or completely different, or partially the same, andwherein a sum of the plurality of first call data packets and theplurality of second call data packets comprises all call data packetscollected by the first terminal.
 65. The apparatus according to claim63, wherein that the first terminal sends the call data packets to thesecond terminal by using the primary link and the at least one auxiliarylink comprises: the first terminal detects an uplink call qualityparameter of the first terminal; and the first terminal keeps a samplingrate, an encoding scheme, an encoding rate, encoding quality,resolution, or a frame rate, based on the uplink call quality parameterfalling within a preset range, of call data in the sent call data packetunchanged; the first terminal increases at least one of a sampling rate,an encoding scheme, an encoding rate, encoding quality, resolution, anda frame rate, based on the uplink call quality parameter being betterthan the preset range and continues to be optimized, of call data in thesent call data packet; and the first terminal reduces at least one of asampling rate, an encoding scheme, an encoding rate, encoding quality,resolution, and a frame rate, based on the uplink call quality parameterbeing worse than the preset range and continues to become worse, of calldata in the sent call data packet.
 66. The apparatus according to claim54, wherein the apparatus is further configured to control the firstterminal to perform: post-processing and playing on the call datapackets received by using the primary link and the at least oneauxiliary link, wherein the post-processing comprises combination,deduplication, and sorting.
 67. The apparatus according to claim 66,wherein, based on a plurality of first call data packets received fromthe primary link and a plurality of second call data packets receivedfrom the auxiliary link having sequence numbers of the same type, thecombination comprises: aggregating the plurality of first call datapackets and the plurality of second call data packets into a combinedcall data packet.
 68. The apparatus according to claim 66, wherein,based on a plurality of first call data packets received from theprimary link and a plurality of second call data packets received fromthe auxiliary link having sequence numbers of different types, thecombination comprises: determining link quality parameters of theprimary link and each auxiliary link; determining an optimal call linkor at least two auxiliary links based on the link quality parameters;and selecting a call data packet received from the optimal call link asa combined call data packet, or combining call data packets on the atleast two auxiliary links to obtain a combined call data packet.
 69. Theapparatus according to claim 66, wherein, based on a plurality of firstcall data packets received from the primary link and a plurality ofsecond call data packets received from the auxiliary link havingsequence numbers of different types, the combination comprises:performing audio and video feature fusion on a first call data packet ofthe plurality of first call data packets received and a second call datapacket of the plurality of second call data packets received, to obtaina fused call data packet; and using the fused call data packet as acombined call data packet.
 70. The apparatus according to claim 55,wherein, based on the auxiliary link being the point-to-point auxiliarylink or the server auxiliary link, the first terminal and the secondterminal establish the auxiliary link by using Wi-Fi or cellular data.71. The apparatus according to claim 70, wherein, based on both thefirst terminal and the second terminal establishing the auxiliary linkby using Wi-Fi, the auxiliary link is always used to transmit a calldata packet until a call ends after the auxiliary link is establishedsuccessfully, or the auxiliary link transmits a call data packet in onlya process in which call quality is abnormal.
 72. The apparatus accordingto claim 70, wherein, based on at least one of the first terminal andthe second terminal establishing the auxiliary link by using thecellular data, the auxiliary link is always used to transmit a call datapacket after the auxiliary link is established successfully, or theauxiliary link is used to transmit a call data packet in only a processin which call quality is abnormal on the primary link.
 73. The apparatusaccording to claim 70, wherein, based on both a first SIM card and asecond SIM card being installed in the first terminal, based on acurrent call card of the first terminal being the first SIM card, andbased on a movement rate of the first terminal is greater than a ratethreshold, the first terminal preferably uses cellular data of thesecond SIM card in a process of establishing the auxiliary link.